<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>播放器</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../../css/public.css" media="all"/>
    <link rel="stylesheet" href="video-js.min.css">
</head>
<body>
<div id="videobox">
    <video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="600"
           height="500">
        <source id="source" type="application/x-mpegURL">
    </video>
</div>
<script type="text/javascript" src="../../js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../../js/jquery.cookie.js"></script>
<script type="text/javascript" src="../../layui/layui.js"></script>
<script type="text/javascript" src="video.min.js"></script>
<script type="text/javascript">
    const PLAYSERVER = "PLAYSERVER";
    var prefix = "https://";
    var replayaddress = sessionStorage.getItem("replayaddress");
    playLoad(replayaddress);

    function playLoad(data) {
        $.ajax({
            url: $.cookie("tempUrl") + "syspara/get_syspara.do?token=" + $.cookie("token"),
            type: "POST",
            contentType: "application/json",
            data: PLAYSERVER,
            success: function (result) {
                if (result.httpStatus === 200) {
                    prefix += result.data.value;
                    var url = prefix + "/" + data;
                    $("#source").attr("src", url);
                    videojs('myVideo', {
                        bigPlayButton: true,
                        textTrackDisplay: false,
                        posterImage: false,
                        errorDisplay: false,
                        autoplay: false,
                        preload: "auto",
                    });
                }
            }
        })
    };

</script>
</body>
</html>